<?php
/**
 * File: cmstags.php.
 * Author: caoqicheng@haibao.com
 * Editor: PhpStorm
 * Date: 17/2/8 上午10:45
 * Brief:
 */
namespace haibao\jiepai\model\data\tag;

class CmsTags extends \haibao\jiepai\model\data\Base{
    
	const TAG_ID_EA = '10001';
	const TAG_ID_JK = '10002';
	const TAG_ID_CH = '10000';
	const TAG_ID_OTHER = '10003';
	const TAG_ID_MODEL = '10100';
	const TAG_ID_BLOGGER = '10101';
	const TAG_ID_STAR = '10102';
	const TAG_ID_FASHION = '89500';
	const TAG_ID_NONAME = '89502';
	const TAG_ID_COLUMN_FASHION = '89788';
	const TAG_ID_COLUMN_BLOGGER = '89787';
	const TAG_ID_COLUMN_STAR = '89786';
	
	public static $tagTypeName = array(
	    self::TAG_ID_EA => '欧美标签',
	    self::TAG_ID_JK => '日韩标签',
	    self::TAG_ID_CH => '华语标签',
	    self::TAG_ID_OTHER => '其他地区',
	    self::TAG_ID_MODEL => '模特',
	    self::TAG_ID_BLOGGER => '博主',
	    self::TAG_ID_STAR => '明星',
	    self::TAG_ID_FASHION => '时尚圈人士',
	    self::TAG_ID_NONAME => '素人',
	    self::TAG_ID_COLUMN_FASHION => '时尚圈街拍',
	    self::TAG_ID_COLUMN_BLOGGER => '博主街拍',
	    self::TAG_ID_COLUMN_STAR => '明星街拍',
	);
	/**
	 * 1.通用，2.人物，3.地点，
	 * 4.事件，5.品牌，6.品类，
	 * 7.场景，8.风格，9.时令，
	 * 10.性别,11.发展地区，
	 * 12.颜色，13.款式,
	 * 14.敏感词，15.标签栏目，
	 * 16.时装周，17.年份,100.未分配
	 */
	const CATEGORY_NORMAL = 1;
	const CATEGORY_PEOPLE = 2;
	const CATEGORY_PARK = 3;
	const CATEGORY_EVENT = 4;
	const CATEGORY_BRAND = 5;
	const CATEGORY_CATE = 6;
	const CATEGORY_SCENE = 7;
	const CATEGORY_STYLE = 8;
	const CATEGORY_SEASON = 9;
	const CATEGORY_GENGER = 10;
	const CATEGORY_DEVELOP = 11;
	const CATEGORY_COLOR = 12;
	const CATEGORY_SMALL = 13;
	const CATEGORY_SENSITIVE = 14;
	const CATEGORY_TAG = 15;
	const CATEGORY_FASHIONISTA = 16;
	const CATEGORY_YEAR = 17;
	const CATEGORY_UNALLOCATED = 100;

	public static $categoryArray = array(
			self::CATEGORY_NORMAL => '通用',
// 			self::CATEGORY_PEOPLE => '人物',
			self::CATEGORY_PARK => '地点',
			self::CATEGORY_EVENT => '事件',
			self::CATEGORY_BRAND => '品牌',
			self::CATEGORY_CATE => '品类',
			self::CATEGORY_SCENE => '场景',
			self::CATEGORY_STYLE => '风格',
			self::CATEGORY_SEASON => '时令',
			self::CATEGORY_GENGER => '性别',
			self::CATEGORY_DEVELOP => '发展地区',
			self::CATEGORY_COLOR => '颜色',
			self::CATEGORY_SMALL => '款式',
// 			self::CATEGORY_SENSITIVE => '敏感词',
			self::CATEGORY_TAG => '标签栏目',
			self::CATEGORY_FASHIONISTA => '时装周',
			self::CATEGORY_YEAR => '年份',
			self::FLAG_DEL => '已关闭'
	);
	
	/**
	 * 判断是否是分类,0不是，1.是
	 */
	const IS_CLASSIFY = 1;
	const DIS_CLASSIFY = 0;
	
	/**
	 * 删除时置为-1，默认是0
	 * 是否是删除
	 */
	const FLAG_IS = 0;
	const FLAG_DEL = -1;
	
	/**
	 * 关系的方法
	 */
	const CATEGORY_RELATION = 'relationWord';
	const CATEGORY_SAMEWORD = 'sameWord';
	const CATEGORY_TOPWORD = 'topWord';
	const CATEGORY_DOWNWORD = 'downWord';
	
	public $TagName;

	public $CategoryID;
	
	public $Picture;
	
	public $UpdatePictureTime;
	
	public $UpdatePictureUser;
	
	public $Creator;
	
	public $IsClassify;
	
	public $Flag;
	
	public $CreateTime;
	
	/**
	 * 获取关系
	 */
	public $TagsRelation;
	

	public function __construct(){
		parent::__construct();
		$this->setColumnName('Id', 'TagID');
		
		$this->stringField('TagName', 'TagName');
		$this->intField('CategoryID', 'CategoryID');
		$this->intField('Picture', 'Picture');
		$this->dateField('UpdatePictureTime', 'UpdatePictureTime');
		$this->intField('UpdatePictureUser', 'UpdatePictureUser');
		$this->intField('Creator', 'Creator');
		$this->intField('IsClassify', 'IsClassify');
		$this->intField('Flag', 'Flag');
		$this->dateField('CreateTime', 'CreateTime');
		
		
		$this->setTableName('cms_tags');
	}
}